import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:widgets/buttons/buttons.dart';
import 'package:widgets/checkbox/checkbox.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            buttonBorderText(title: '文字按钮', onClick: () {}),
            const Gap(10),
            buttonText(title: '文字按钮', onClick: () {}),
            const Gap(10),
            buttonBorderImage(image: 'assets/images/h.jpeg', onClick: () {}),
            const Gap(10),
            buttonImage(image: 'assets/images/h.jpeg', onClick: () {}),
            const Gap(10),
            buttonBorderIconText(
                title: '图标按钮', icon: Icons.settings, onClick: () {}),
            const Gap(10),
            buttonIconText(
                title: '图标按钮',
                icon: Icons.settings,
                highlightColor: Colors.red,
                hoverColor: Colors.pink,
                onClick: () {}),
            const Gap(10),
            buttonImageText(
                title: '图片按钮', image: 'assets/images/h.jpeg', onClick: () {}),
            const Gap(10),
            checkBoxCircle(isFirstSelected: true),
            const Gap(10),
            checkBox(isChecked: true)
          ],
        ),
      ),
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
